.TH "IXP_SENDMSG" 3 "2012 Dec" "libixp Manual"


.SH NAME

.P
ixp_sendmsg, ixp_recvmsg

.SH SYNOPSIS

.nf
#include <ixp.h>

uint ixp_sendmsg(int fd, IxpMsg *msg);

uint ixp_recvmsg(int fd, IxpMsg *msg);
.fi


.SH DESCRIPTION

.P
These functions read and write messages to and from the given
file descriptors.

.P
ixp_sendmsg writes the data at \fImsg\fR\->pos upto \fImsg\fR\->end.
If the call returns non\-zero, all data is assured to have
been written.

.P
ixp_recvmsg first reads a 32 bit, little\-endian length from
\fIfd\fR and then reads a message of that length (including the
4 byte size specifier) into the buffer at \fImsg\fR\->data, so
long as the size is less than \fImsg\fR\->size.

.SH RETURN VALUE

.P
These functions return the number of bytes read or
written, or 0 on error. Errors are stored in
\fBixp_errbuf(3)\fR.

.\" man code generated by txt2tags 2.6 (http://txt2tags.org)
.\" cmdline: txt2tags -o- ixp_sendmsg.man3
